<?php

namespace App\Model;

use App\User;
use Illuminate\Database\Eloquent\Model;
use Spatie\Activitylog\Traits\LogsActivity;

class Lesson extends Model
{
    use LogsActivity;
    protected static $logFillable=true;
    protected static $recordEvents=['created','updated'];
    protected static $logName='lesson';
    protected $fillable=['title','description','icon'];



    public function video(){
        return $this->hasMany (Video::class);
    }

    public function user(){
        return $this->belongsTo (User::class);
    }
}
